<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
            {*include file="template/admin_head.htm"*}
    </head>

    <body>
        <div class="wrapper">
            {*if $cf_action=='add' || $cf_action=='edit'*}
            <div class="sbox">
                <form name="act_form" id="act_form" method="post" action="{*$form_action*}">
                    <input name="id" id="id" type="hidden" value="{*$row['power_id']*}" />
                    <input name="act" id="act" type="hidden" value="{*$cf_action*}" />
                    <div class="title">
                        <h3>新增/修改权限</h3><span><a class="edit at" href="{*$cf_self_path*}-act_index.htm">权限管理</a></span></div>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tbl tbl_nbr">
                        <tbody>
                            <tr>
                                <td width="15%" align="right" class="ltd">标题:</td>
                                <td width="85%" align="left"><input name="power_title" type="text" id="power_title" value="{*$row['power_title']*}" size="25" maxlength="20" /></td>
                            </tr>
                            <tr>
                                <td class="ltd" align="right">controller:</td>
                                <td align="left"><input name="power_controller" type="text" id="power_controller" value="{*$row['power_controller']*}" size="25" maxlength="50" /></td>
                            </tr>
                            <tr>
                                <td class="ltd" align="right">action:</td>
                                <td align="left"><input name="power_action" type="text" id="power_action" value="{*$row['power_action']*}" size="25" maxlength="50" /></td>
                            </tr>
                            <tr>
                                <td class="ltd" colspan="2" align="center"><input type="submit" name="Submit" value="提 交" class="myinput" />
                                        &nbsp;&nbsp;
                                        <input type="button" name="back" value="返 回" onclick="window.history.back()" class="myinput" /></td>
                                            </tr>
                                            </tbody>
                                            </table>
                                            </form>
                                            </div>
                                            {*else*}
                                            <script type="text/javascript">
                                                $(function(){
                                                    $(".openpart").toggle(
                                                    function(){$("."+this.id).hide();$("#"+this.id).attr("src","public/images/admin/close_part.gif")},
                                                    function(){$("."+this.id).show();$("#"+this.id).attr("src","public/images/admin/open_part.gif")}
                                                )

                                                    $("#checkall").toggle(
                                                    function(){
                                                        select_all("idlist[]",true);
                                                    },
                                                    function(){
                                                        select_all("idlist[]",false);
                                                    }
                                                );
                                                    $("#list_form").submit(function(){
                                                        if(!count_select("idlist[]")){
                                                            my_alert('请选择id记录','Error');
                                                            return false;
                                                        };
                                                        if($("#alltype").val()==''){
                                                            my_alert('请选择操作方式','Error',"$('#alltype').focus()");
                                                            return false;
                                                            return false;
                                                        };
                                                        if(confirm('确定进行操作?')==false){
                                                            return false;
                                                        }
                                                        return true;
                                                    });
                                                });



                                            </script>

                                            <!--  <div class="pannel">
		<div class="pl"></div>
		<div class="pr"></div>

		<div class="pc">
			<div class="pt">
				
				<input type="text" class="tet" name="key" id="key" size="20" />
				<img src="public/images/admin/icon_search_btn.gif"/>
				<b>站内</b><input type="radio" name="3" class="rdo" />
			</div>
			<div class="separate"></div>

			<div class="pt">
				<img src="public/images/admin/icon_search.gif"/>

				<select>
					<option value="">收件夹</option>
				</select>
				<input type="text" class="tet" size="10" />
				<img src="public/images/admin/icon_search_btn.gif"/>
				<b>站内</b><input type="radio" name="3" class="rdo" />

			</div>
		</div>
	</div>-->

                                            <div class="sbox">
                                                <div class="title"><h3>权限管理</h3><span><a class="edit at" href="{*$cf_self_path*}-act_add.htm">权限新增</a></span></div>
                                                <form name="list_form" id="list_form" method="post" action="{*$cf_self_path*}-act_all.htm">
                                                    <input name="act" type="hidden" value="all" />
                                                    <table width="100%" class="tbl tbl_nbr">
                                                        <thead>
                                                            <tr class="thd">
                                                                <td width="6%" align="center">选择</td>
                                                                <td width="35%" align="center" class="thr">标题(controller)</td>
                                                                <td width="33%" align="center" class="thr">action</td>
                                                                <td colspan="2" align="center" class="thr">操作</td>
                                                            </tr>
                                                        </thead>
                                                        <tbody>
                                                            {*foreach $data_ary as $item*}
                                                            {*assign var=part value='part-'|cat:$item['power_id']*}
                                                            <tr onmouseout="this.style.backgroundColor='#fff'" onmouseover="this.style.backgroundColor='#ffc'" style=" background-color:#ffffff">
                                                                <td align="center">&nbsp;</td>
                                                                <td><img src="public/images/admin/open_part.gif" class="openpart" id="{*$part*}" align="absmiddle" />{*$item['power_controller']*}</td>
                                                                <td>&nbsp;</td>
                                                                <td width="13%" align="center"><!--<a href="{*$cf_self_path*}-act_edit_id_{*$item['power_id']*}.htm" class="edit">修改</a>--></td>
                                                                <td width="13%" align="center"><!--<a href="{*$cf_self_path*}-act_del_id_{*$item['power_id']*}.htm" class="del" onclick="return confirm('你确定要删除吗?')">删除</a>--></td>
                                                            </tr>
                                                            {*foreach $item['child'] as $item2*}
                                                            <tr class="{*$part*}" onmouseout="this.style.backgroundColor='#fff'" onmouseover="this.style.backgroundColor='#ffc'" style=" background-color:#ffffff">
                                                                <td align="center"><input type="checkbox" name="idlist[]" value="{*$item2['power_id']*}" style="height:15px;" /></td>
                                                                <td>&nbsp;&nbsp;&nbsp;├ {*$item2['power_title']*}</td>
                                                                <td>{*$item2['power_action']*}</td>
                                                                <td align="center"><a href="{*$cf_self_path*}-act_edit_id_{*$item2['power_id']*}.htm" class="edit">修改</a></td>
                                                                <td align="center"><a href="{*$cf_self_path*}-act_del_id_{*$item2['power_id']*}.htm" class="del" onclick="return confirm('你确定要删除吗?')">删除</a></td>
                                                            </tr>
                                                            {*/foreach*}
                                                            {*/foreach*}

                                                            <tr class="tft">
                                                                <td colspan="5" style="padding:0;">
                                                                    <table width="100%" border="0">
                                                                        <tr>
                                                                            <td width="6%" align="center" style="border:0;padding:0;"><input type="button" name="checkall" id="checkall" class="myinput" value="全 选" /></td>
                                                                            <td width="22%" align="center" style="border:0;padding:0;"><select name="alltype" id="alltype" >
                                                                                    <option selected="selected" value="">操作选择</option>
                                                                                    <option value="alldel">删除</option>
                                                                                </select>
                                                                                &nbsp;<input type="submit" name="submit_all" id="submit_all" value="批量操作" class="myinput" /></td>
                                                                            <td width="72%" style="border:0;padding:0;" ><div class="turnPage"><!--<p>{*$page*}</p>--></div></td>
                                                                        </tr>
                                                                    </table>
                                                                </td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                </form>
                                            </div>
                                            <br />
                                            {*/if*}

                                            </div>
                                            </body>
                                            </html>